<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-16" />
<title>Untitled Document</title>
<link rel="stylesheet" href="<?php echo STATIC_DOMAIN;?>css/reset.css" type="text/css" media="all">
<link rel="stylesheet" href="<?php echo STATIC_DOMAIN;?>css/buiding.css" type="text/css" media="all">
<script type="text/javascript" src="<?php echo STATIC_DOMAIN;?>js/jquery-1.8.2.min.js"></script>
</head>
<body>
	<div id="warp">
    	<div id="header">
        </div>
        <!-- end header-->
        <div id="content">
        	<div id="leftMenu">
            	<ul class="navi">
                	<li><a>Trang chủ</a></li>
                    <li><a>Giới thiệu</a></li>
                    <li><a>Hướng dẫn</a></li>
                    <li><a>Chat</a></li>
                    <li class="marbottom20"><a>Đăng nhập</a></li>
                    
                	<li><a>Forum</a></li>
                    <li><a>Cốt truyện</a></li>
                    <li><a>Trợ giúp</a></li>
                    <li><a>Liên hệ</a></li>
                    <li><a>Tìm hiểu</a></li>
                    <li><a href="<?php echo site_url("logout");?>">Thoát ra</a></li>
                </ul>
            </div>
        	<div id="viewInfo" class="padtop20 padleft20 tbl-list">
                <form method="POST" action="" enctype="multipart/form-data">
                    <table class="tbl-list" width="500">
                        <thead>
                            <tr>
                                <td colspan="2" class="text-center"><label>Trả lời</label></td>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td class="ver-middle">Người nhận</td>
                                <td>
                                    <input id="target" name="target" class="input-field" type="text" size="30" value="<?php echo $info['name'];?>" />
                                </td>
                            </tr>
                            <tr>
                                <td class="ver-middle"><label>Tiêu đề</label></td>
                                <td><input id="topic" name="topic" class="input-field" type="text" size="60" value="<?php echo 'RE:'.$info['topic'];?>" /></td>
                            </tr>
                            <tr>
                                <td class="ver-middle">&nbsp;</td>
                                <td>
                                    <span class="cursor-pointer" onclick="warptext('nd', '[b]', '[/b]');">
                                        <b style="font-size: 16px;">B</b>
                                    </span>
                                    <a onclick="warptext('nd', '[r]', '[/r]');" class="padleft5">
                                        <img src="<?php echo site_url();?>images/icons/red.gif" width="13" height="13" />
                                    </a>
                                </td>
                            </tr>
                            <tr class="ver-middle">
                                <td>Nội dung</td>
                                <td><textarea id="nd" name="nd" class="input-txtarea" cols="75" rows="20" wrap="virtual"><?php echo '&#10;&#10;&#10;'.$info['message'];?></textarea></td>
                            </tr>
                            <tr>
                                <td class="text-center" colspan="2">
                                    <input value="Gửi thư" type="submit" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
     </div>
<script type="text/javascript">
function FxGetTxt(elementID, open, close)
{
	var selLength = document.getElementById(elementID).textLength;
	var selStart = document.getElementById(elementID).selectionStart;
	var selEnd = document.getElementById(elementID).selectionEnd;
	if (selEnd == 1 || selEnd == 2)  selEnd = selLength;
	var s1 = (document.getElementById(elementID).value).substring(0,selStart);
	var s2 = (document.getElementById(elementID).value).substring(selStart, selEnd)
	var s3 = (document.getElementById(elementID).value).substring(selEnd, selLength);
	document.getElementById(elementID).value = s1 + open + s2 + close + s3;
	return;
}
function warptext(elementID, openTag, closeTag) {
	var selStart = document.getElementById(elementID).selectionStart;
	var selEnd = document.getElementById(elementID).selectionEnd;
	var ooo = (document.getElementById(elementID).value).substring(selStart, selEnd);
	if(ooo != 0){
		if (document.selection && document.selection.type == "Text") {
				var range = document.selection.createRange();
				range.text = openTag + range.text + closeTag;
		} else {
			txt=FxGetTxt (elementID, openTag, closeTag);
		}
	}
}
</script>
</body>
</html>